// TOWN DIALOGUE SCRIPT
//    Town 3: Corinth

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice, tt;

// *** Guards ***
begintalknode 1;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Guard";
	text1 = "The guard is too busy trying not to get killed to converse with you.";
	text2 = "He does offer a cherry wave before continuing on his way.";
	action = END_TALK;

// *** Paul ***
begintalknode 6;
	state = -1;
	personality = 306;
	nextstate = 7;
	condition = 1;
	question = "Paul";
	text1 = "A well-versed instructor is scribbling on some paper behind the counter.";
	text2 = "He looks up as you approach.  _Welcome, I'm Paul, your instructor._ he says.";
	text3 = "_Are you in need of some training?_ he asks.";
	text5 = "Paul is busy working on a diagram in front of him.";
	text6 = "He pauses as you get close and asks _Back for more?_";
	action = INTRO;

begintalknode 7;
	state = 7;
	personality = 306;
	nextstate = -1;
	condition = 1;
	question = "What do you teach?";
	text1 = "Paul replies _I can lead you into training for whatever you already know._";
	text2 = "_The cost is quite inexpensive for the only training facility in The Wilderness._";
	text3 = "_Are you ready to begin training?_ Paul asks.";

begintalknode 8;
	state = 7;
	personality = 306;
	nextstate = -1;
	condition = (get_flag(3, 5) == FALSE);
	question = "How much to train?";
	text1 = "Paul replies _It will cost you 50 coins apiece to enter into the training rooms._";
	text2 = "_Is that agreeable?_";
	code =
		set_flag(3, 5, TRUE);
	break;

begintalknode 9;
	state = 7;
	personality = 306;
	nextstate = -1;
	condition = ((get_flag(3, 5) > 0) && (has_special_item(9) == 0));
	question = "I'd like to train (50 coins apiece).";
	text1 = "Paul takes your money and gives you a key.";
	text2 = "_Here you go.  Train hard_ he says.";
	text3 = "_You don't have enough coins for your party_ Paul says.";
	text4 = "_Come back when you have the required amount._";
	code =
		tt = (party_size() * 50);
		clear_strings();
		if (coins_amount() < tt) {
			add_string(3);
			add_string(4);
		}
		else {
			play_sound(15);
			add_string(1);
			add_string(2);
			change_coins(0 - tt);
			change_spec_item(9, 1);
		}
	break;

begintalknode 10;
	state = 7;
	personality = 306;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "Paul waves and goes back to working on what he was doing before.";
	action = END_TALK;
